export LANG=C
export CC=gcc
ifndef TUXDIR
    export TUXDIR=/opt/tuxedo
endif
export LIBPATH=../../../../common/c

SRCS=main.c monitor.c listener.c worker.c
BIN=seagent
BIN_DEBUG=seagent_debug

.PHONY : default debug release clean

default : $(BIN_DEBUG)

all : debug release

debug : $(BIN_DEBUG)

$(BIN_DEBUG) : $(SRCS)
	@export CFLAGS="-Wall -g -D_MY_DEBUG -I$(LIBPATH)/include"; buildclient -v -o $@ -f "$^ $(LIBPATH)/lib/libsoar_g.a"
	chmod 744 $@

release : $(BIN)

$(BIN) : $(SRCS)
	@export CFLAGS="-Wall -g -I$(LIBPATH)/include"; buildclient -v -o $@ -f "$^ $(LIBPATH)/lib/libsoar_g.a"
#	@export CFLAGS="-Wall -O3 -I$(LIBPATH)/include"; buildclient -v -o $@ -f "$^ $(LIBPATH)/lib/libsoar.a"
	chmod 744 $@

clean :
	rm -f core* $(BIN) $(BIN_DEBUG)
